package com.agileplex.products.acc.commands;

import com.agileplex.products.acc.CommandExecutionException;
import com.agileplex.products.acc.Session;
import com.agileplex.products.acc.results.ICommandResult;

/**
 * ACC command.
 *
 * @creator Rui Tang
 * @date 2008-06-17
 *
 * @LastChanged
 * @LastChangedBy $LastChangedBy: tangrui@agileplex.com $
 * @LastChangedDate $LastChangedDate: 2008-06-22 16:08:49 +0000 (Sun, 22 Jun 2008) $
 * @LastChangedRevision $LastChangedRevision: 7 $
 */
public abstract class Command {

    private String name;
    private CommandType type;
    private Parameters params;

    public Command(String name) {
        this.name = name;
        this.type = CommandType.ABSTRACT;
    }

    public String getName() {
        return this.name;
    }

    public void setType(CommandType type) {
        this.type = type;
    }

    public CommandType getType() {
        return this.type;
    }

    public void setParameters(Parameters params) {
        this.params = params;
    }

    public abstract ICommandResult exec(LexicalParser lexicalParser, Session session) throws CommandExecutionException;

}
